remove error channel
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m52s
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m52s
This commit is contained in:
@@ -29,7 +29,6 @@ func (c *Client) Close() {
|
||||
|
||||
type CartTCPClient struct {
|
||||
net.Conn
|
||||
Errors chan error
|
||||
ErrorCount int
|
||||
address string
|
||||
*CartPacketQueue
|
||||
@@ -41,7 +40,6 @@ func NewCartTCPClient(address string) (*CartTCPClient, error) {
|
||||
return nil, err
|
||||
}
|
||||
return &CartTCPClient{
|
||||
Errors: make(chan error),
|
||||
ErrorCount: 0,
|
||||
Conn: connection,
|
||||
address: address,
|
||||
@@ -53,10 +51,7 @@ func (m *CartTCPClient) Connect() error {
|
||||
if m.Conn == nil {
|
||||
connection, err := net.Dial("tcp", m.address)
|
||||
if err != nil {
|
||||
|
||||
m.Errors <- err
|
||||
m.ErrorCount++
|
||||
|
||||
return err
|
||||
}
|
||||
m.ErrorCount = 0
|
||||
|
||||
Reference in New Issue
Block a user