Skip to content

Commit

Permalink
Fix: avoid import cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
rod-hynes committed Jul 21, 2017
1 parent 1d2d82b commit 9d2b07d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions psiphon/common/crypto/ssh/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import (
"io"
"log"
"sync"

"github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/protocol"
)

const (
Expand Down Expand Up @@ -57,7 +55,12 @@ const (
// channel; we still select a size smaller than the stock
// channelWindowSize due to client memory constraints.
func getChannelWindowSize(chanType string) int {
if chanType == protocol.PACKET_TUNNEL_CHANNEL_TYPE {

// From "github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/protocol".
// Copied here to avoid import cycle.
packetTunnelChannelType := "tun@psiphon.ca"

if chanType == packetTunnelChannelType {
return 16 * channelMaxPacket
}
return 4 * channelMaxPacket
Expand Down

0 comments on commit 9d2b07d

Please sign in to comment.