bugfixes
This commit is contained in:
parent
6450812fac
commit
18ce1bbade
3 changed files with 7 additions and 1 deletions
3
Makefile
3
Makefile
|
@ -33,4 +33,5 @@ kill:
|
||||||
killall -9 eeProxy
|
killall -9 eeProxy
|
||||||
|
|
||||||
fire:
|
fire:
|
||||||
curl --socks5 127.0.0.1:7950 http://i2p-projekt.i2p
|
\/usr/bin/curl --socks5-hostname 127.0.0.1:7950 http://i2p-projekt.i2p --output -
|
||||||
|
\/usr/bin/curl --socks5-hostname 127.0.0.1:7950 http://inr.i2p --output -
|
||||||
|
|
|
@ -2,6 +2,7 @@ package conn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
@ -78,9 +79,11 @@ func (c Conn) Keys() (sam3.I2PKeys, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m Conn) Cleanup() error {
|
func (m Conn) Cleanup() error {
|
||||||
|
log.Println("Cleaning up client connection.", m.name)
|
||||||
if err := m.SAMConn.Close(); err != nil {
|
if err := m.SAMConn.Close(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
log.Println("Cleaning up client session.", m.name)
|
||||||
if err := m.StreamSession.Close(); err != nil {
|
if err := m.StreamSession.Close(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,11 +66,13 @@ func (m Manager) Dial(ctx context.Context, network, addr string) (net.Conn, erro
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m Manager) Cleanup() error {
|
func (m Manager) Cleanup() error {
|
||||||
|
log.Println("Initiating cleanup.")
|
||||||
for _, c := range m.conns {
|
for _, c := range m.conns {
|
||||||
if err := c.Cleanup(); err != nil {
|
if err := c.Cleanup(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
log.Println("Finished cleanup.")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue