Conns aren't being saved

This commit is contained in:
idk 2018-12-26 13:17:21 -05:00
parent 064f09c624
commit d77d5f9800
No known key found for this signature in database
GPG key ID: D75C03B39B5E14E1
2 changed files with 9 additions and 5 deletions

View file

@ -99,19 +99,19 @@ func NewConn(sam sam3.SAM, addr, path string, opts []string) (Conn, error) {
c.name = t32.Base32() + ".i2pkeys"
c.I2PKeys, err = c.Keys()
if err != nil {
return nil, err
return Conn{}, err
}
c.StreamSession, err = c.SAM.NewStreamSession(c.I2PKeys.Addr().Base32()[0:10]+"-"+RandTunName(), c.I2PKeys, opts)
if err != nil {
return nil, err
return Conn{}, err
}
i2paddr, err := c.SAM.Lookup(addr)
if err != nil {
return nil, err
return Conn{}, err
}
c.SAMConn, err = c.StreamSession.DialI2P(i2paddr)
if err != nil {
return nil, err
return Conn{}, err
}
return c, nil
}